package com.example.testsinglety.order;

import jakarta.annotation.Resource;
import org.apache.rocketmq.spring.core.RocketMQTemplate;
import org.springframework.stereotype.Component;

@Component
public class OrderProducer {
    @Resource
    private RocketMQTemplate rocketMQTemplate;

    public void sendOrderCreatedEvent(String orderId) {
        rocketMQTemplate.convertAndSend("ORDER_TOPIC", orderId);
    }

}
